/**
 request.js 的封装快速使用
 */
var request = require('request');

/**
 * get 请求方法
 * @param url
 * @returns {Promise<*>}
 */
async function get(url) {
    return request(url, function (error, response, body) {
        // console.log('error:', error); // Print the error if one occurred
        // console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
        // console.dir(response); // Print the response status code if a response was received
        // console.log('body:', body); // Print the HTML for the Google homepage.
        return response;
    });
}

module.exports = {
    get,

}